<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">   
<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:h="http://java.sun.com/jsf/html"  xmlns:f="http://java.sun.com/jsf/core"  xmlns:ui="http://java.sun.com/jsf/facelets"  xmlns:p="http://primefaces.prime.com.tr/ui">    
    <f:view contentType="text/html">  
        <h:head>  
            <title>  
                <ui:insert name="title">Gama Detecta</ui:insert>  
            </title>  
            <link rel="shortcut icon" href="Imagens/HP-Projector.ico"/>  
            <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>  
            <link type="text/css" rel="stylesheet" href="#{request.contextPath}/themes/#{guestPreferences.theme}/skin.css" />  
            <link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/roller/ui-darkness/theme.css" />  
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
            <style type="text/css">  
                .ui-widget {  font-size: 75%;  }    
                .themeMenu {  overflow: auto;  height:300px;  width:200px;  }    
                .ui-layout-north {  z-index:20 !important;  overflow:visible;  }    
                .ui-layout-north .ui-layout-unit-content {  overflow:visible;  }  
            </style>  
        </h:head> 
        <h:body>
            <p:layout fullPage="true">

                <p:layoutUnit position="top" height="110"  resizable="false" closable="false" collapsible="false">
                    <p:graphicImage width="1355" height="99" value="/Imagens/sate4_antiga.jpg" /> 
                </p:layoutUnit>



                <p:layoutUnit position="left" width="200" header="Menu" resizable="false" closable="false" collapsible="false">
                    <h:form>  
                        <p:growl id="growl" showDetail="true"/>   
                        <p:menu position="left" style="width:190px;height:150px;">    
                            <p:menuitem value="Home" url="/" icon="ui-icon ui-icon-home"/> 
                            <p:menuitem value="Cadastre-se" url="faces/user.xhtml" icon="ui-icon ui-icon-plus"/>  
                            <p:menuitem value="Informar Foco" url="#" icon="ui-icon ui-icon-pencil"/>  
                            <p:menuitem value="Consultar Focos" url="/" icon="ui-icon ui-icon-search"/>  
                        </p:menu>    
                    </h:form>   
                </p:layoutUnit>



                <p:layoutUnit position="center">
                    <p:breadCrumb >   
                        <p:menuitem value="Categories" url="/" />
                        <p:menuitem value="Informar Foco" url="#" />
                    </p:breadCrumb>   



         
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    
                    <h:form >  
            <h:panelGrid id="panelloginaluno" columns="3"  cellspacing="25px">   
                    <h:outputLabel value="login" for="login"/>  
                    <p:keyboard title ="Login" id="login" value="#{loginBean.login.login}" required="true" requiredMessage="Campo em Branco"/>
                    <p:message for="login"/>
                    <h:outputLabel value="Senha" for="senha"/>  
                    <p:password id="senha"  minLength="5" value="#{loginBean.login.senha}" required="true" requiredMessage="Campo em Branco"/>  
                    <p:message for="senha"/>
                    <p:commandButton  value="Entrar" action="#{loginBean.login}" ajax="false" image="ui-icon ui-icon-disk"/>
                   </h:panelGrid> 
            <p:messages /> 
                    </h:form>
                    
                    
                    
                    
                    
                    



                    <p:dialog widgetVar="dlg" effect="FADE" effectDuration="0.5" close="false" fixedCenter="true">
                        <h:form prependId="false">
                            <h:panelGrid columns="2">
                                <h:outputLabel for="title" value="Descrição:" />
                                <p:inputText id="title" value="#{mapBean.title}" />

                                <f:facet name="footer">
                                    <p:commandButton value="Adicionar" 
                                                     actionListener="#{mapBean.addMarker}" 
                                                     update="messages" 
                                                     oncomplete="markerAddComplete()"/>
                                    <p:commandButton value="Cancelar" onclick="return cancel()"/>
                                </f:facet>
                            </h:panelGrid>

                            <h:inputHidden id="lat" value="#{mapBean.lat}" />
                            <h:inputHidden id="lng" value="#{mapBean.lng}" />
                        </h:form>
                    </p:dialog>

                    <script type="text/javascript">
                            var currentMarker = null;
	
                            function handlePointClick(event) {
                                    if(currentMarker == null) {
                                            document.getElementById('lat').value = event.latLng.lat();
                                            document.getElementById('lng').value = event.latLng.lng();

                                            currentMarker = new google.maps.Marker({
                                                    position:new google.maps.LatLng(event.latLng.lat(), event.latLng.lng())
                                            });
							
                                            map.addOverlay(currentMarker);

                                            dlg.show();
                                    }	
                            }

                            function markerAddComplete() {
                                    var title = document.getElementById('title');
                                    currentMarker.setTitle(title.value);
                                    title.value = "";

                                    currentMarker = null;
                                    dlg.hide();
                            }

                            function cancel() {
                                    dlg.hide();
                                    currentMarker.setMap(null);
                                    currentMarker = null;

                                    return false;
                            }
                    </script>


                </p:layoutUnit>

            </p:layout>	
        </h:body>
    </f:view> 
</html>

